﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MROApprove.aspx.cs" Inherits="PRProcess.MROApprove" %>

<%@ Register Src="../../Processes/ProcessControl/ButtonList.ascx" TagName="buttonlist"
    TagPrefix="btn" %>
<%@ Register Src="../../Processes/ProcessControl/ApprovalHistory.ascx" TagName="approvalhistory"
    TagPrefix="ah" %>
<%@ Register Src="../../Processes/ProcessControl/Attachments.ascx" TagName="attachments"
    TagPrefix="attach" %>
<%@ Register Src="../../Processes/ProcessControl/UserInfo.ascx" TagName="userinfo"
    TagPrefix="ui" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="NewPRProcessHead" runat="server">
    <title>Purchasing Requisition采购申请</title>
    <script src="../../js/jquery.js" type="text/javascript"></script>
    <script src="../../js/common.js" type="text/javascript"></script>
    <script type="text/javascript" src="../../js/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript">
        $().ready(function () {
            $("#ButtonList1_btnGeneratePO").css("display", "block");
            //alert($("#ButtonList1_btnGeneratePO").css("display"));
            $("#ButtonList1_btnGeneratePO").bind("click", function () {
                // if (confirm("确定转成PO?")) {
                if (submitForm()) {
                    var prno = $("#UserInfo1_fld_DOCUMENTNO").text();
                    // alert(prno);
                    window.open("/Modules/Workflow/OpenForm.aspx?type=PR2PO&ProcessName=Purchasing Order&stepname=start&incident=0&prno=" + prno);
                    return true;
                }
                // }
                return false;
            });
        });
    </script>
</head>
<body>
    <form id="frm_NewPRProcess" runat="server">
    <div class="container">
        <div class="row">
            <ui:userinfo id="UserInfo1" processtitle="Purchasing Requisition<br/>采购申请" readonly="true"
                processprefix="PR" tablename="PROC_PURCHASEREQUEST" tablenamedetail="PROC_PURCHASEREQUEST_DT"
                runat="server"></ui:userinfo>
        </div>
        <div class="row">
            <table class="table table-condensed table-bordered">
                <tr>
                    <td class="banner" colspan="6">
                        Application Details / 详细信息
                    </td>
                </tr>
                <tr>
                    <td class="td-label">
                        if CER,No.:/若是资本支出,号码
                    </td>
                    <td class="td-content">
                        <asp:Label ID="fld_CERNO" runat="server" disInput="true" Enabled="true"></asp:Label>
                        <%--<asp:Button ID="Button1" runat="server" Text="" Width="10%" Height="25px" CssClass="btn"
                            OnClientClick="return selectPage1();" />--%>
                    </td>
                    <td class="td-label">
                        Project/Product Line/项目/产品类
                    </td>
                    <td class="td-content">
                        <asp:Label ID="fld_PRODUCTLINE" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="td-label">
                        Applicant Phone/申请人电话
                    </td>
                    <td class="td-content">
                        <asp:Label ID="fld_APPLICANTPHONE" runat="server"></asp:Label>
                    </td>
                    <td class="td-label">
                        Recommended Supplier/<br />
                        推荐供应商
                    </td>
                    <td class="td-content" colspan="3">
                        <asp:Label ID="fld_RECOMMENDSUPPLIER" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="td-label">
                        Category/大类
                    </td>
                    <%-- <td class="td-content"  colspan="3">
                            <asp:CheckBox ID="fld_ISTOOLS" runat="server"/>
                            Tools/工具
                               <span style=" padding-left:140px">
                            <asp:CheckBox ID="fld_ISPARTS" runat="server"  TextAlign="Left" /> 
                            Spare Parts/备品备件
                            </span>
                             <span style=" padding-left:140px">
                            <asp:CheckBox ID="fld_ISCONSUMABLES" runat="server"  TextAlign="Left" /> 
                            Consumables/消耗材料
                            </span>
                        </td>--%>
                    <td class="td-content"  colspan="4">
                        <asp:Label ID="fld_CATAGARY" runat="server"></asp:Label>
                    </td>
                    <%--<td class="td-label">
                        Subcategories/小类
                    </td>
                    <td class="td-content">
                        <%-- <asp:DropDownList ID="fld_SUBCATAGARY" runat="server" AppendDataBoundItems="true"
                            DataTextField="CNNAME">
                            <asp:ListItem Text="---请选择大类,再选择小类---" Value="" Selected="True"></asp:ListItem>
                        </asp:DropDownList>--%>
                        <asp:Label ID="fld_SUBCATAGARY" runat="server"></asp:Label>
                    </td>
                    <%-- <td class="td-content"  colspan="3">
                            <asp:CheckBox ID="fld_ISMACHINE" runat="server"  TextAlign="Left" /> 
                            Machine & Equipment/机器设备
                            <span style=" padding-left:28px">
                            <asp:CheckBox ID="fld_ISFIXTURE" runat="server"  TextAlign="Left" /> 
                            Fixture & Furtuniture/工装,夹具及家具    </span> 
                            <br />                    
                            <asp:CheckBox ID="fld_ISARICLES" runat="server"  TextAlign="Left" /> 
                            Low Value Aricles 低值易耗件
                             <span style=" padding-left:39px">
                            <asp:CheckBox ID="fld_ISLICENSE" runat="server"  TextAlign="Left" /> 
                            Service/License/服务/许可证
                             </span>
                        </td>--%>
                </tr>
            </table>
        </div>
        <div>
            <tr>
                <td colspan="6">
                    <table class="table table-condensed table-bordered tablerequired" id="tbDetail">
                        <tr>
                            <th style="display: none">
                                No<br />
                                序号
                            </th>
                            <th style="width: 90px">
                                Capex Item<br />
                                Capex品名
                            </th>
                            <th>
                                Budget Number<br />
                                预算编号
                            </th>
                            <th>
                                Item Description<br />
                                品号 / 品名
                            </th>
                             <th>
                                Cost Category<br/>成本类别
                            </th>
                            <th>
                                Sub<br/>Categories小类
                            </th>
                            <th>
                                Spec<br />
                                规格
                            </th>
                            <th>
                                Quantity<br />
                                数量
                            </th>
                            <th>
                                Unit Price<br />
                                单价
                            </th>
                            <th>
                                Estimated Price<br />
                                估价 (RMB)
                            </th>
                            <th>
                                Expected Delivery<br />
                                期望到货日期
                            </th>
                            <th>
                                Owner/Phone<br />
                                负责人/电话
                            </th>
                            <th>
                                Balance
                                <br />
                                余额
                            </th>
                            <%-- <th>
                                <asp:Button ID="btnAdd" runat="server" Text="Add/增加" CssClass="btn" CausesValidation="false"
                                    OnClick="btnAdd_Click" />
                            </th>--%>
                        </tr>
                        <asp:Repeater ID="fld_detail_PROC_PURCHASEREQUEST_DT" runat="server">
                            <ItemTemplate>
                                <tr>
                                    <td style="display: none;">
                                        <asp:Label ID="fld_ID" Text='<%# Container.ItemIndex+1 %>' runat="server" Width="80%"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:Label ID="fld_FORMID" Text='<%#Eval("FORMID") %>' runat="server" Style="display: none"></asp:Label>
                                        <asp:Label ID="fld_CAPEXITEM" Text='<%# Eval("CAPEXITEM") %>' runat="server"></asp:Label>
                                    </td>
                                    <%--  <td>
                                                <asp:Label ID="fld_PHONE"  Text=''  runat="server" Width="85%"   style=" cursor:hand" onclick="return selectPage1();"></asp:Label>
                                            </td>--%>
                                    <td>
                                        <asp:Label ID="fld_ITEMNUMBER" Text='<%# Eval("ITEMNUMBER") %>' runat="server" Width="85%"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:Label ID="fld_ITEMDECRIPTION" Text='<%# Eval("ITEMDECRIPTION") %>' runat="server"
                                            Width="85%"></asp:Label>
                                    </td>
                                      <td>
                                         <asp:Label ID="fld_COSTCATEGORY" Text='<%# Eval("COSTCATEGORY") %>' runat="server"
                                            Width="85%"></asp:Label>
                                    </td>
                                     <td>
                                         <asp:Label ID="fld_SUBCATAGARY" Text='<%# Eval("SUBCATAGARY") %>' runat="server"
                                            Width="85%"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:Label ID="fld_SPEC" Text='<%# Eval("SPEC") %>' runat="server" Width="85%"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:Label ID="fld_QUANTITY" Text='<%# Eval("QUANTITY") %>' money='money' runat="server"
                                            Width="85%"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:Label ID="fld_UNITPRICE" Text='<%# Eval("UNITPRICE") %>' money="money" runat="server"
                                            Width="85%"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:Label ID="fld_ESTIMATEDPRICE" Text='<%# Eval("ESTIMATEDPRICE") %>' money="money"
                                            runat="server" Width="85%"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:Label ID="fld_EXPECTDELIVERY" Width="80%" Text='<%# Convert.ToDateTime(Eval("EXPECTDELIVERY")).ToShortDateString() %>'
                                            runat="server"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:Label ID="fld_OWNER" Text='<%# Eval("OWNER") %>' runat="server" Width="85%"></asp:Label>
                                    </td>
                                    <td>
                                        <asp:Label ID="fld_BALANCE" Text='<%# Eval("BALANCE") %>' runat="server" Width="80%"></asp:Label>
                                    </td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                    </table>
                </td>
            </tr>
        </div>
        <div class="row">
            <attach:attachments id="Attachments1" readonly="true" runat="server"></attach:attachments>
        </div>
        <div class="row">
            <ah:approvalhistory id="ApprovalHistory1" showaction="true" runat="server"></ah:approvalhistory>
        </div>
        <div class="row">
            <btn:buttonlist id="ButtonList1" runat="server"></btn:buttonlist>
        </div>
    </div>
    <div style="display: none;">
        <asp:Label ID="var_isItCapex" runat="server"></asp:Label>
        <asp:Label ID="var_PROJECTLEADERAD" runat="server"></asp:Label>
        <asp:TextBox ID="fld_SUBMITSUPERIORS" runat="server"></asp:TextBox>
    </div>
    </form>
</body>
<script>
    
</script>
</html>
